import { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/login.vue'),
    meta: {
      title: '登录',
      hideInMenu: true
    }
  },
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue'),
    redirect: '/login',
    children: [
      {
        path: '/model',
        name: 'Model',
        component: () => import('@/views/Model/ModelIndex.vue'),
        meta: {
          title: '选择网络模型',
          icon: 'Monitor',
          requiresAuth: true
        }
      },
      {
        path: '/train',
        name: 'ModelTrain',
        component: () => import('@/views/predict/components/ModelTrain.vue'),
        meta: {
          title: '模型训练',
          icon: 'School',
          group: 'predict'
        }
      },
      {
        path: '/predict',
        name: 'ModelPredict',
        component: () => import('@/views/predict/components/ModelPredict.vue'),
        meta: {
          title: '模型预测',
          icon: 'DataLine',
          group: 'predict'
        }
      },
      {
        path: '/display',
        name: 'PredictDisplay',
        component: () => import('@/views/predict/components/PredictDisplay.vue'),
        meta: {
          title: '预测展示',
          icon: 'TrendCharts',
          group: 'predict'
        }
      },
      {
        path: '/detect',
        name: 'Detect',
        component: () => import('@/views/Detect/DetectIndex.vue'),
        meta: {
          title: '异常检测',
          icon: 'Warning'
        }
      }
    ]
  }
]

export default routes



